#include "userservice.h"

UserService::UserService(Database *db, QObject *parent)
    : QObject(parent)
{
    m_userDao = new UserDao(db);
}

QMap<QString, QVariant> UserService::getCurrentUser()
{
    return m_currentUser;
}

void UserService::setCurrentUser(const QMap<QString, QVariant> &user)
{
    m_currentUser = user;
}

bool UserService::authenticate(const QString &username, const QString &password, int &roleId)
{
    return m_userDao->authenticateUser(username, password, roleId);
}
